<template>
  <div class="app-container">
      <levelbar></levelbar>
      <div class="content">
        <div class="top-title">添加广告</div>
        <span class="title">广告类型</span>
        <el-form :model="form" :rules="rules" ref="form" label-width="100px" class="form title-adv" label-position='right'>
          <el-row :gutter="41">
            <el-col :span="10">
              <el-form-item label="广告类型" prop="value" :rules="rules.value">
                <el-select v-model="form.value" placeholder="请选择" style="width:100%">
                  <el-option v-for="item in form.advList" :key="item.value" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>

        <!-- 积分商城顶部广告位 -->
        <integralShop v-if="form.value == '0'"></integralShop>

        <!-- e学云教育平台首页广告位 -->
        <!-- <e-cloud-adv v-if="form.value == '1'"></e-cloud-adv> -->

        <!-- app全屏广告位 -->
        <advApp v-if="form.value == '2'"></advApp>

        <!-- 周边教育广告 -->
        <around-education v-if="form.value == '3'"></around-education>

        <!-- 课程学习广告 -->
        <!-- <course-learn-adv v-if="form.value == '4'"></course-learn-adv> -->

      </div>
      
  </div>
</template>
<script>
import Levelbar from '../../../layout/Levelbar';
import advApp from './advApp';
import integralShop from './integralShop';
import eCloudAdv from './eCloudAdv';
import aroundEducation from './aroundEducation';
export default {
    name: 'parcelMangement',
    components: { Levelbar, advApp, integralShop, eCloudAdv, aroundEducation},
    data() {
        return {
            form: {
                //  广告类型（0：积分商城顶部广告位  1：e学云教育平台首页广告位  2：APP全屏广告位 3：周边教育广告 4：课程学习广告）
                advList: [
                    {
                        label: '积分商城顶部广告位',
                        value: '0'
                    },
                    // {
                    //     label: 'e学云教育平台首页广告位',
                    //     value: '1'
                    // },
                    {
                        label: 'APP全屏广告位',
                        value: '2'
                    },
                    {
                        label: '周边教育广告',
                        value: '3'
                    }
                    // {
                    //     label: '课程学习广告',
                    //     value: '4'
                    // }
                ],
                value: '0'
            },
            rules: {
                value: [
                    { required: true, message: '内容不能为空', trigger: 'blur' }
                ]
            }
        };
    },
    methods: {
        
    }
};
</script>
<style lang="scss" scoped>
.top-title{
    text-align: center;
    font-size: 18px;
    color: #333;
    height: 78px;
    line-height: 78px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}
.app-container {
  position: relative;
  padding: 20px 20px 10px;
  
  .content {
    position: relative;
    padding: 20px 30px 10px;
    background: #fff;
    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.1);
    .title {
      position: relative;
      font-size: 14px;
      color: rgb(106, 85, 72);
      padding-left: 24px;
      margin: 30px 0;
      display: block;
      &::after {
        position: absolute;
        content:'';
        width: 4px;
        height: 14px;
        background: #ff5e2c;
        left: 0;
        top: 4px;
      }
    }
    .form {
      padding-left: 2px;
    }
  }
  .title-adv {
      margin-bottom: 80px;
  }
}
</style>
